//
//  GroundGlass.m
//  ABX's MusicPlayer
//
//  Created by lanou3g on 15/6/25.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "GroundGlass.h"

@implementation GroundGlass

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setImage:[UIImage imageNamed:@"maoboli.png"]];
        
        //self.userInteractionEnabled = YES;
        self.visualEffectView = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
        self.visualEffectView.frame = self.bounds;
        
        self. visualEffectView.alpha = 1;
        [self addSubview: self.visualEffectView];
        
    }
    
    
    
    return self;
    
}

- (instancetype)initWithFrame:(CGRect)frame style:(UIBlurEffectStyle)style{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setImage:[UIImage imageNamed:@"maoboli.png"]];
        
        //self.userInteractionEnabled = YES;
        self.visualEffectView = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:style]];
        self.visualEffectView.frame = self.bounds;
        
        self. visualEffectView.alpha = 1;
        [self addSubview: self.visualEffectView];
    }
    return self;
}


@end
